﻿<%@ Page Language="C#" MasterPageFile="~/Templates/Member.master" AutoEventWireup="true" CodeFile="MemberInfo.aspx.cs" Inherits="MemberInfo" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

 <div style="height:500px;width:100%;">
        <div style="width:100%; background-color:#F3F8FE; height:25px; color:#014D7F; padding-top:5px;">&nbsp; &nbsp;个人资料</div>
        <div>

            <div id="divContent" style="margin-left:50px; margin-top:20px; font-weight:normal; color:#404040;">
                
                <table cellpadding="0" cellspacing="0" border="0" width="500px">
                    <tr style="height:30px;"><td style="width:100px;" align="right">用户名：</td> <td>
                        <asp:Label ID="lblName" runat="server" Text="" ForeColor="#FF6600"></asp:Label></td>
                         
                    </tr>
                     <tr style="height:30px;"><td style="width:100px;" align="right">邮箱：</td> <td>
                        <asp:Label ID="lblEmail" runat="server" Text="" ForeColor="#FF6600"></asp:Label></td>
                         
                    </tr>   
                    <tr style="height:30px;"><td style="width:100px;" align="right">真实姓名：</td> <td valign="middle">
                        <asp:TextBox ID="txtName" MaxLength="16" Width="150px" runat="server"></asp:TextBox></td>
                         
                    </tr>              
                       
                    <tr style="height:30px;"><td style="width:100px;" align="right">性别：</td> <td td valign="middle">
                        <asp:RadioButtonList ID="rdSex" runat="server" RepeatDirection="Horizontal" Width="121px">
                            <asp:ListItem>男</asp:ListItem>
                            <asp:ListItem>女</asp:ListItem>
                        </asp:RadioButtonList>
                        </td>
                         
                    </tr>
                    <tr><td style="width:100px;" align="right">个人所在地：</td> <td valign="middle">
                        
                        <select style="width:70px;" id="SelectPro" onchange="ProvinceChange(this,SelectCity);"></select>
                        <select style="width:90px;" id="SelectCity" onchange="CityChange(this,SelectArea)"></select>
                        <select style="width:90px;" id="SelectArea" ></select>
                        </td> </tr>
                    <tr style="height:30px;"><td style="width:100px;" align="right">详细地址：</td> <td valign="middle">
                        <asp:TextBox ID="txtAddress" MaxLength="64" runat="server" Width="300px"></asp:TextBox></td>
                         
                    </tr>
                    <tr style="height:30px;"><td style="width:100px;" align="right">邮政编码：</td> <td valign="middle">
                        <asp:TextBox ID="txtPostCode" MaxLength="6" Width="150px" runat="server" ></asp:TextBox></td>
                         
                    </tr>
                    <tr style="height:30px;"><td style="width:100px;" align="right">电话：</td> <td valign="middle">
                        <asp:TextBox ID="txtPhone" MaxLength="64" runat="server" Width="150px"></asp:TextBox></td>
                         
                    </tr>
                    <tr style="height:30px;"><td style="width:100px;" align="right">QQ：</td> <td valign="middle">
                        <asp:TextBox ID="txtQQ" MaxLength="64" runat="server" Width="150px"></asp:TextBox></td>
                         
                    </tr>
                    <tr>
                        <tr ><td colspan="2"> <hr /> </td></tr>
                    </tr>
                    <tr style="height:40px">
                        <td colspan="2" align="center">
                            <asp:Button ID="Button1" CssClass="short-btn" OnClientClick="return CheckForm();"  runat="server" Text="确定" OnClick="Button1_Click" /> &nbsp; &nbsp;
                            <input type="button" class="short-btn" onclick="window.history.go(-1);"   value="取消" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center"> 
                            <asp:Label ID="lblMsg" runat="server" ForeColor="Red"></asp:Label></td>
                    </tr>
                </table>
                
            </div>
            <div style="visibility:hidden;">
                <asp:TextBox ID="txtProvince" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtCity" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtArea" runat="server"></asp:TextBox>
            </div>
             
        </div>
    </div>
    <script language="javascript" src="js/Area.js"></script>
    <script  language="javascript">
        window.onload=function()
        {
            DataBing(document.getElementById("SelectPro"),ArrProvince); 
            var pro = document.getElementById("ctl00_ContentPlaceHolder1_txtProvince").value;
            var city = document.getElementById("ctl00_ContentPlaceHolder1_txtCity").value;
            var area = document.getElementById("ctl00_ContentPlaceHolder1_txtArea").value;
            var i=0;
            if(pro != "")
            {
               // document.getElementById("SelectPro").value = pro;
               // ProvinceChange(document.getElementById("ctl00_ContentPlaceHolder1_txtProvince"),document.getElementById("ctl00_ContentPlaceHolder1_txtCity"));
               var objProvince = document.getElementById("SelectPro");
               var objCity = document.getElementById("SelectCity");
               var objArea = document.getElementById("SelectArea");
               var opts = objProvince.options;
               for(i=0;i<opts.length;i++)
               {
                    if( opts[i].text == pro)
                    {
                        objProvince.value = opts[i].value;
                        ProvinceChange(objProvince,objCity);
                        break;
                    }
               }
               
               if(city != "")
               {
                   var opts = objCity.options;
                   for(i=0;i<opts.length;i++)
                   {
                        if( opts[i].text == city)
                        {
                            objCity.value = opts[i].value;
                            CityChange(objCity,objArea);
                            break;
                        }
                   }
                   if(area != "")
                   {
                       var opts = objArea.options;
                       for(i=0;i<opts.length;i++)
                       {
                            if( opts[i].text == area)
                            {
                                objArea.value = opts[i].value; 
                                break;
                            }
                       }
                   }
               }
            }
        }
        function CheckForm()
        {   
            var objPro =  document.getElementById("SelectPro");
            var objCity = document.getElementById("SelectCity");
            var objArea = document.getElementById("SelectArea");
            document.getElementById("ctl00_ContentPlaceHolder1_txtProvince").value =objPro.options[objPro.selectedIndex].text;
            document.getElementById("ctl00_ContentPlaceHolder1_txtCity").value = objCity.options[objCity.selectedIndex].text;
            document.getElementById("ctl00_ContentPlaceHolder1_txtArea").value = objArea.options[objArea.selectedIndex].text;
            return true;
        }
    </script>
</asp:Content>

